﻿using Colover.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Colover.Models
{
	/// <summary>
	/// Notice information model.
	/// </summary>
    public partial class NoticeInfo : NotificationObject
    {
        public NoticeInfo() { }

        #region Fields
		private int id;
		private string title;
		private string content;
		private string author;
		private DateTime postdate = DateTime.Now;
		private DateTime expireddate=DateTime.Now.AddMonths(1);
		private bool isimportant = false;
		private bool showOnHomepage = false;
        #endregion

        #region Properties
		/// <summary>
		/// Gets or sets the identifier.
		/// </summary>
		/// <value>The identifier.</value>
        public int Id {
			get{ return id;}
			set {
				id = value;
				RaisePropertyChanged (() => Id);
			}
		}

		/// <summary>
		/// Gets or sets the title.
		/// </summary>
		/// <value>The title.</value>
		public string Title {
			get{ return title;}
			set {
				title = value;
				RaisePropertyChanged (() => Title);
			}
		}

		/// <summary>
		/// Gets or sets the content.
		/// </summary>
		/// <value>The content.</value>
		public string Content{
			get{ return content;}
			set{
				content=value;
				RaisePropertyChanged(()=>this.Content);
			}
		}

		/// <summary>
		/// Gets or sets the author.
		/// </summary>
		/// <value>The author.</value>
		public string Author {
			get{ return author;}
			set {
				author = value;
				RaisePropertyChanged (() => this.Author);
			}
		}

		/// <summary>
		/// Gets or sets the postdate.
		/// </summary>
		/// <value>The postdate.</value>
		public DateTime Postdate {
			get{ return postdate;}
			set {
				postdate = value;
				RaisePropertyChanged (() => this.Postdate);
			}
		}

		/// <summary>
		/// Gets or sets the expireddate.
		/// </summary>
		/// <value>The expireddate.</value>
		public DateTime Expireddate {
			get{ return expireddate;}
			set {
				expireddate = value;
				RaisePropertyChanged (() => this.Expireddate);
			}
		}

		/// <summary>
		/// Gets or sets a value indicating whether this instance is important.
		/// </summary>
		/// <value><c>true</c> if this instance is important; otherwise, <c>false</c>.</value>
		public bool IsImportant {
			get{ return isimportant;}
			set {
				isimportant = value;
				RaisePropertyChanged (() => this.IsImportant);
			}
		}

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="Colover.Models.NoticeInfo"/> show on homepage.
		/// </summary>
		/// <value><c>true</c> if show on homepage; otherwise, <c>false</c>.</value>
		public bool ShowOnHomepage {
			get{ return showOnHomepage;}
			set {
				showOnHomepage = value;
				RaisePropertyChanged (() => this.ShowOnHomepage);
			}
		}
        #endregion
	}
}
